package com.dayouzi.crawler_monitor.pojo.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="AddDataQuery", description="新增数据")
public class AddDataQuery {

    @ApiModelProperty(value = "id")
    private Integer id;

    @NotEmpty(message = "标题不能为空")
    @ApiModelProperty(value = "标题")
    private String title;

    @NotEmpty(message = "发布时间不能为空")
    @ApiModelProperty(value = "发布时间")
    private String pubtime;

    @NotNull(message = "地区id不能为空")
    @ApiModelProperty(value = "地区id")
    private Integer areaId;

    @NotEmpty(message = "地区不能为空")
    @ApiModelProperty(value = "地区")
    private String location;

    @NotEmpty(message = "来源不能为空")
    @ApiModelProperty(value = "来源")
    private String author;

    @NotEmpty(message = "链接不能为空")
    @ApiModelProperty(value = "链接")
    private String outurl;

    @NotNull(message = "类型不能为空")
    @ApiModelProperty(value = "类型")
    private Integer cateId;

    @NotEmpty(message = "正文不能为空")
    @ApiModelProperty(value = "正文")
    private String info;

    @NotNull(message = "爬虫类型不能为空")
    @ApiModelProperty(value = "爬虫类型")
    private Integer spiderType;

    @NotEmpty(message = "服务器不能为空")
    @ApiModelProperty(value = "服务器")
    private String machine;

    @NotEmpty(message = "数据库不能为空")
    @ApiModelProperty(value = "数据库")
    private String database;

    @NotEmpty(message = "数据表不能为空")
    @ApiModelProperty(value = "数据表")
    private String tableName;

    @ApiModelProperty(value = "入库时间")
    private Long addTime;
}
